<!--当前登录用户的信息-->
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<header th:fragment="navigation" class="heard" data-am-sticky>
    <div class="am-g">
        <div class="am-u-lg-5 left">
            <div th:if="${user} != null" class="user-info">
                <!--            头像-->
                <img class="user-img am-circle" th:src="'/images/'+${user!=null?user.getAvatar():''}">
                <!--            名字-->
                <a class="user-name hide-after-exceed"
                   th:href="'/p/'+${user!=null?user.getNickName():''}"
                   th:text="${user!=null?user.getNickName():''}"></a>
            </div>
            <div th:if="${user} == null" class="user-info">

            </div>
        </div>
        <div class="am-u-lg-5 right">
            <nav th:if="${user} != null" class="menu-list" >
                <!--        用户的菜单-->
                <span th:each="item,index:${user.getPermissionList()}">
                    <a th:href="${item.getPmsUrl()}"
                       th:text="${item.getPmsName()}"></a>
                    <span th:text="${index.last?'':'/'}">/</span>
                </span>
            </nav>
            <nav th:if="${user} == null" class="menu-list">
                <a href="/login">login</a>
            </nav>
        </div>
    </div>
</header>
